package pl.perseus.action;

import java.util.HashMap;
import java.util.Map;

import lombok.Getter;
import lombok.Setter;

import org.springframework.beans.factory.annotation.Autowired;

import pl.perseus.model.Degree;
import pl.perseus.service.degree.IDegreeService;

public class GetDegreeByIdAction extends BaseAction {

	@Getter
	@Setter
	private Degree degree;
	
	@Autowired
	IDegreeService degreeService;
	
	@Getter
	@Setter
	Map<String, Object> result;
	
	@Override
	public String execute() {
		
		result = new HashMap<String, Object>();
		Degree concreteDegree = degreeService.selectByIdDegree(degree.getId());
		result.put("degree", concreteDegree);
		
		return SUCCESS;
	}

}
